package org.shoukaiseki.supersaiyan.db.inittable.system;

import org.shoukaiseki.inittable.domain.TableColumnInfo;
import org.shoukaiseki.inittable.domain.TableIndexInfo;
import org.shoukaiseki.inittable.service.ITableBuildInfoService;
import org.shoukaiseki.kakaroto.annotation.TableBuild;

import java.util.List;

import static org.shoukaiseki.inittable.utils.SksColumnCamelCaseCommon.uniqueId;
import static org.shoukaiseki.inittable.utils.TableColumnInfoBuilder.column;
import static org.shoukaiseki.inittable.utils.TableInfoUtils.tableColumns;

@TableBuild(name = "sys_dict_data", comment = "字典数据表",version = 1)
public class SysDictDataInitTableInfo implements ITableBuildInfoService {


    @Override
    public List<TableColumnInfo> tableColumnInfoList(){
        List<TableColumnInfo> table = tableColumns(
                uniqueId("dict_code","字典编码"),
                column("	dict_sort   int          default 0   null comment '字典排序',"),
                column("	dict_label  varchar(100) default ''  null comment '字典标签',"),
                column("	dict_value  varchar(100) default ''  null comment '字典键值',"),
                column("	dict_type   varchar(100) default ''  null comment '字典类型',"),
                column("	css_class   varchar(100)             null comment '样式属性（其他样式扩展）',"),
                column("	list_class  varchar(100)             null comment '表格回显样式',"),
                column("	is_default  char         default 'N' null comment '是否默认（Y是 N否）',"),
                column("	status      char         default '0' null comment '状态（0正常 1停用）',"),
                column("	sync_flag   int(12)      default '1' not null comment '同步标识',")
                        .description("同步标识,默认根据代码中的同步,当存在修改时,则只更改排序,在前端修改字典信息后,该值变为0")
                        .remark("暂只对 dictType中的该字段有效,现在全清之后重建字典"),
                column("	create_by   varchar(64)  default ''  null comment '创建者',"),
                column("	create_time datetime                 null comment '创建时间',"),
                column("	update_by   varchar(64)  default ''  null comment '更新者',"),
                column("	update_time datetime                 null comment '更新时间',"),
                column("	remark      varchar(500)             null comment '备注'"),

                null
        );

        return table;
    }

}
